package main

import (
	"log"
	"net"
	"net/http"
	"net/rpc"

	"rtsp1/source/server"
)

func main() {
	server := server.NewServer()
	rpc.Register(server)
	rpc.HandleHTTP()
	l, err := net.Listen("tcp", ":8081")
	if err != nil {
		log.Fatal(err.Error())
	}
	log.Println("Serve on 8081")
	http.Serve(l, nil)
}
